From 508424df0926c4709c14b17c1d40f103f5a43546 Mon Sep 17 00:00:00 2001 From: David Vrabel Date: Sat, 16 Jul 2011 09:05:45 +0100 Subject: [PATCH] xen/libxc: set CPUID topology leaf as unsupported for PV guests The result of a CPUID Extended Topology Enumeration leaf for PV guests is invalid as the level in ECX is ignored. This can cause some guests to loop endlessly when trying to enumerate the topology. Since the physical topology isn't useful to PV guests set the topology leaf as unsupported. Guests affected include Linux kernels prior 2.6.32 where a workaround was applied ("xen: mask extended topology info in cpu", 82d6469916c6fcfa345636a49004c9d1753905d1). Signed-off-by: David Vrabel --- tools/libxc/xc_cpuid_x86.c | 1 + xen/arch/x86/traps.c | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c index d95baf5403..2b3602001d 100644 --- a/tools/libxc/xc_cpuid_x86.c +++ b/tools/libxc/xc_cpuid_x86.c @@ -518,6 +518,7 @@ static void xc_cpuid_pv_policy( case 5: /* MONITOR/MWAIT */ case 0xa: /* Architectural Performance Monitor Features */ + case 0x0000000b: /* Extended Topology Enumeration */ case 0x8000000a: /* SVM revision and features */ case 0x8000001b: /* Instruction Based Sampling */ case 0x8000001c: /* Light Weight Profiling */ diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index 266db18b49..977ba3a60d 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -861,6 +861,7 @@ static void pv_cpuid(struct cpu_user_regs *regs) /* fall through */ case 5: /* MONITOR/MWAIT */ case 0xa: /* Architectural Performance Monitor Features */ + case 0x0000000b: /* Extended Topology Enumeration */ case 0x8000000a: /* SVM revision and features */ case 0x8000001b: /* Instruction Based Sampling */ case 0x8000001c: /* Light Weight Profiling */ -- 2.30.2